// =============================================================
// CNodeIPKey
// ---------------------------------------
// Author : Woo-Hyun Kim
// Email : woorung@icu.ac.kr or woorung@nhncorp.com
// Date : Oct. 9, 2007
// =============================================================
#include "CNodeIPKey.h"

CNodeIPKey::CNodeIPKey()
{
}

CNodeIPKey::~CNodeIPKey()
{
}

//--------------------------------------------------------------
// Node IP-based space key
// # Attention : configure only a representative service based on IP, 
//               even though there are many instances on the node
//--------------------------------------------------------------
string &CNodeIPKey::get_spacekey(CServiceInfo &service_info, string &spacekey)
{
	char make_key[256];
	sprintf(make_key, "%s",service_info.getIP());
	spacekey = hash(make_key, spacekey);

	return spacekey;
}
//--------------------------------------------------------------
